<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>购物车 - 我的歪麦呢</title>
		<link rel="stylesheet" href="css/cart.css">
		<script src="js/jquery-3.7.1.js"></script>
	</head>
	<body>
		<!-- 顶部标题栏 -->
		<div class="header">
			<div class="back-btn" onclick="goBack()">←</div>
			<div>购物车</div>
		</div>

		<!-- 购物车商品列表 -->
		<div class="cart-item">
			<div class="item-select">✓</div>
			<div class="item-image"></div>
			<div class="item-info">
				<div class="item-name">水煮鱼</div>
				<div class="item-desc">麻辣口味，含配菜</div>
				<div class="item-price">¥38</div>
			</div>
			<div class="item-actions">
				<div class="quantity-btn" onclick="changeQuantity(this, -1)">-</div>
				<div class="quantity">1</div>
				<div class="quantity-btn" onclick="changeQuantity(this, 1)">+</div>
			</div>
		</div>

		<div class="cart-item">
			<div class="item-select">✓</div>
			<div class="item-image"></div>
			<div class="item-info">
				<div class="item-name">夫妻肺片</div>
				<div class="item-desc">麻辣鲜香，经典川菜</div>
				<div class="item-price">¥28</div>
			</div>
			<div class="item-actions">
				<div class="quantity-btn" onclick="changeQuantity(this, -1)">-</div>
				<div class="quantity">1</div>
				<div class="quantity-btn" onclick="changeQuantity(this, 1)">+</div>
			</div>
		</div>

		<!-- 结算栏 -->
		<div class="checkout-bar">
			<div>
				<span>合计: </span>
				<span class="total-price">¥66</span>
			</div>
			<div class="checkout-btn" onclick="checkout()">去结算</div>
		</div>

		<!-- 底部导航 -->
		<div class="bottom-nav">
			<div class="nav-item active" onclick="goToHome()">
				<div class="nav-icon">🏠</div>
				<div>首页</div>
			</div>
			<div class="nav-item" onclick="goToOrders()">
				<div class="nav-icon">📦</div>
				<div>订单</div>
			</div>
			<div class="nav-item">
				<div class="nav-icon">🛒</div>
				<div>购物车</div>
			</div>
			<div class="nav-item" onclick="goToProfile()">
				<div class="nav-icon">👤</div>
				<div>我的</div>
			</div>
		</div>
	</body>
</html>
<script>
	function goToProfile() {
		window.location.href = "profile.html"
	}
	
	function goToOrders(){
		window.location.href = "orders.html"
	}
	
	function goToHome() {
		window.location.href = "home.html"
	}
</script>
